package com.umpay.config;

import org.aopalliance.intercept.MethodInvocation;
import org.springframework.transaction.interceptor.TransactionInterceptor;

public class DynamicTransactionInterceptor extends TransactionInterceptor{

	private static final long serialVersionUID = 3480182454753636419L;

	@Override
    public Object invoke(final MethodInvocation invocation) throws Throwable {
		DatabaseContextHolder.setDatabaseType(DatabaseType.onlineDB);
        Object object = super.invoke(invocation);
        return object;
    }
}
